package com.common.strategy.impl;

import com.common.authentication.Oauth2TestModeAuthentication;
import com.common.pojo.Oauth2TestMode;
import com.common.strategy.AccountTypeStrategy;
import org.springframework.stereotype.Component;

/**
 * @Description: 测试形式登陆，此处只是为了测试用的。
 * @Date: 2025/6/6 21:15
 */
@Component("test")
public class TestAccountTypeStrategy implements AccountTypeStrategy<Oauth2TestModeAuthentication, Oauth2TestMode> {

    private final String TEST_AUTHENTICATION = "TEST_AUTHENTICATION";

    @Override
    public Oauth2TestModeAuthentication login(Oauth2TestMode mode) {
        Oauth2TestModeAuthentication authentication = new Oauth2TestModeAuthentication();
        authentication.setBusinessId(TEST_AUTHENTICATION);
        return authentication;
    }
}
